/*
 * author      : 吴中勤 
 * date        : 2018/8/10
 * description : 响应基类
 */

package com.deepexi.adapter.facade.moby.response;


import com.deepexi.adapter.common.BaseDto;

public class BaseResponseBody extends BaseDto {
    protected static final String CODE_OK = "0";
    protected String code;
    protected String msg;


    public static BaseResponseBody allOk() {
        BaseResponseBody responseBody = new BaseResponseBody();
        responseBody.setCode("0");
        return responseBody;
    }

    public static BaseResponseBody unHappy(String errMsg) {
        BaseResponseBody responseBody = new BaseResponseBody();
        responseBody.setCode("1");
        responseBody.setMsg(errMsg);
        return responseBody;
    }

    // ============= setter & getter =============

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
